<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Home</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="<?php echo site_url('css/style_gerenciador.css')?>"/>
		
		<link rel="stylesheet" type="text/css" href="<?php echo site_url('css/smoothness/jquery-ui-1.8.16.custom.css')?>"/>

		<script type="text/javascript">
			var site_url = '<?=site_url()?>';
		</script>
		<script type="text/javascript" src="<?=skinJS( 'jquery.js' )?>"></script>
		<script type="text/javascript" src="<?=skinJS( 'jquery-ui.js' )?>"></script>
		<script type="text/javascript" src="<?=skinJS( 'aplicacao.js' )?>"></script>
		<script type="text/javascript" src="<?=skinJS( 'price.js' )?>"></script>
		<script type="text/javascript" src="<?=skinJS( 'mask.js' )?>"></script>
		<?
			if(!$this->session->userdata('logged_in')){
				redirect(site_url('gerenciador'));
			}

			if ( isset( $colecaoJS ) )
				foreach ( $colecaoJS as $arquivo ) {
		?>
			<script type="text/javascript" src="<?=skinJS( $arquivo )?>"></script>
		<?
				}
		?>
	</head>

<body>
	<?php $this->load->view('gerenciador/topo'); ?>
	<div>
		<div id="left">
			<h1>LEMBRETES FINANCEIROS</h1>
			<?php 
			
				$lembretes = $_SESSION['dadosLembretes'];
				
				if(!empty($lembretes)){
					foreach($lembretes as $data => $lembrete){
			?>	
							<h2><a href="<?=site_url("lancamento/editar/{$lembrete->LancamentoID}")?>" style="text-decoration:none;">0<?=$data+1?> - <strong>Lançamento <?=$lembrete->LancamentoID;?></strong></h2></a> 
							<ul>
								<?php
									if(date("Y-m-d") < $lembrete->DataVencimento){
										$cor = "green";
									}elseif(date("Y-m-d") == $lembrete->DataVencimento){
										$cor = "yellow";
									}else{
										$cor = "red";
									}
								?>
								<li style="color: <?=$cor?>">Vencimento: <?=FormatarData($lembrete->DataVencimento, '/');?></li>
								<li>Obs.: <?=$lembrete->Observacao;?></li>
								<li>Valor: R$ <?=$lembrete->Valor;?></li>
							</ul>
			<?
					}
				}else{
					echo "<p><h2><strong>Nenhum lançamento previsto</strong></h2></p>";
				}			
			?>
			
			<br>
			<br>
			
				Legenda:
				<ul>
					<li style="color:red">Vencidos</li>
					<li style="color:yellow">Vence hoje</li>
					<li style="color:green">Vencimento Futuro</li>
				</ul>
			
		</div>
		
		<div id="content"><div class="inner_copy"><a href="http://www.site2you.com/">Website Builder</a> <a href="http://www.freetemplatesonline.com/">fto</a> <a href="http://www.websitetemplates.org/">websitetemplates.org</a> <a href="http://www.webdesign.org/website-design">Website Design</a></div>
			<?php 
				$this->load->view($conteudo); 
			?>
		</div>
	</div>
</body>
</html>


